/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:46 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Danhgia_NguoidungEntity
    {
        public Danhgia_NguoidungEntity()
        {
            m_pk_idanhgia_nguoidungid = 0;
            m_dthoidiemdanhgia = DateTime.Now;
            m_fknguoidanhgiaid = 0;
            m_fknguoiduocdanhgiaid = 0;
        }
		private Int64 m_pk_idanhgia_nguoidungid;
        public Int64 PK_iDanhgia_NguoidungID
		{
            get { return m_pk_idanhgia_nguoidungid; }
            set { m_pk_idanhgia_nguoidungid = value; }
		}
        private DateTime m_dthoidiemdanhgia;
        public DateTime dThoidiemdanhgia
        {
            get { return m_dthoidiemdanhgia; }
            set { m_dthoidiemdanhgia = value; }
        }
        private Int32 m_fknguoiduocdanhgiaid;
        public Int32 FK_iNguoiduocdanhgiaID
        {
            get { return m_fknguoiduocdanhgiaid; }
            set { m_fknguoiduocdanhgiaid = value; }
        }
        private Int32 m_fknguoidanhgiaid;
        public Int32 FK_iNguoidanhgiaID
        {
            get { return m_fknguoidanhgiaid; }
            set { m_fknguoidanhgiaid = value; }
        }

        #region Comparison
        public static List<Danhgia_NguoidungEntity> Sort(List<Danhgia_NguoidungEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo = typeof(Danhgia_NguoidungEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null, null) as Comparison<Danhgia_NguoidungEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        #endregion
    }
}
